
local list = {
    {'金之星','杀之星','萤之星'},
}
local lock = {}
for i,da in ipairs(list) do
    da.key = ('携带吞噬%s'):format(i)
    for _,name in ipairs(da) do
        lock[name] = da
    end
end



ac.game:event '单位-获得物品效果'(function(_,unit,item)
    local data = lock[item.name]
    if not data then
        return
    end
    
    local items = {}
    for a,name in ipairs(data) do
        local it = unit:find_item(name)
        if it==nil then
            return
        end
        items[a] = it
    end
    for a,item in ipairs(items) do
        unit:notify('单位-吞噬物品', unit, item)
    end

end)
